<!-- 今日待确认 今日待审核 今日待提货 组件 -->
<template>
    <view class="header">
        <view class="quick_check" @click="goOutletWaybill">
            <h3  style="margin-left:-20rpx;">{{ props.allNum }}</h3>
            <p>今日待确认
                <RectRight class="icon" />
            </p>
        </view>
        <view class="quick_check" @click="goReviewToday">
            <h3 style="margin-left:-20rpx;">{{ props.confirmNum }}</h3>
            <p>今日待审核
                <RectRight class="icon" />
            </p>
        </view>
        <view class="quick_check" @click="goSignToday">
            <h3 style="margin-left:-20rpx;">{{ props.receiveNum }}</h3>
            <p>今日待提货
                <RectRight class="icon" />
            </p>
        </view>
    </view>
</template>
    
<script setup lang='ts'> 
import { RectRight } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro';

const props = defineProps<{
    allNum: number //今日待确认数量
    confirmNum: number //今日待审核数量
    receiveNum: number //今日待提货数量
}>()

// 跳转今日待确认
function goOutletWaybill() {
    if(props.allNum == 0){
        Taro.showToast({
            title: '今日无待确认',
            icon:'none',
            duration: 2000
        }) 
        return
    }
    Taro.navigateTo({
        url: '/pages2/waitToday/index'
    })
}

// 跳转今日待审核
function goReviewToday() {
    if(props.confirmNum == 0){
        Taro.showToast({
            title: '今日无待审核',
            icon:'none',
            duration: 2000
        }) 
        return
    }
    Taro.navigateTo({
        url: '/pages2/reviewToday/index'
    })
}

// 跳转今日待提货
function goSignToday() {
    if(props.receiveNum == 0){
        Taro.showToast({
            title: '今日无待提货',
            icon:'none',
            duration: 2000
        }) 
        return
    }
    Taro.navigateTo({
        url: '/pages2/signToday/index'
    })
}
</script>
    
<style lang="scss"> .header {
     display: flex;
     justify-content: space-evenly;
     margin-bottom: 50rpx;
     font-size: 28rpx;

     .quick_check {
         text-align: center;
         color: #fff;

         h3 {
             font-size: 60rpx;
             font-weight: 700;
             margin-bottom: 20rpx;
         }

         .icon {
             vertical-align: middle;
             margin-left: -10rpx;
         }
     }
 }
</style>